﻿using ACC.Data.Comm;
using ACC.Data.Line;
using ACC.Device;
using ACC.LineDevice.KukaPack;

namespace Script
{
    /// <summary>
    /// 安装MSD插座
    /// </summary>
    public class L1P01021 : StnProcessKukaPack
    {
        public L1P01021(StnRunningData data)
            : base(data)
        {
            materialTypeCount = 2;
        }
        protected override ACCDevice CreateDevice()
        {
            ACCDevice dev = base.CreateDevice();
            if (kukaSiemensDev != null)
            {
                kukaSiemensDev.DB190 = 800;
                kukaSiemensDev.DB190_Offset = 1000;
                kukaSiemensDev.DB192 = 80;
                kukaSiemensDev.DB192_PLC_Offset = 1066;//配方号(PartTypeID)
                kukaSiemensDev.DB192_ACC_Offset = 1200;//工艺参数

                kukaSiemensDev.DB193 = 800;
                kukaSiemensDev.DB193_PLC_Offset = 1034;
                kukaSiemensDev.DB193_ACC_Offset = 1068;
                kukaSiemensDev.DB194 = 800;
                kukaSiemensDev.DB194_PLC_Offset = 1034;
                kukaSiemensDev.DB194_PLC_Data_Offset = 1078;

                kukaSiemensDev.PartTypeDataIntLength = 100; // 20 默认20
                //kukaSiemensDev.PartTypeDataRealLength = 50;
                //kukaSiemensDev.PartTypeDataStringLength = 5;
                //kukaSiemensDev.PartTypeDataStringDataLength = 30;
                //kukaSiemensDev.ProcessDataStringDataLength = 30;
            }

            return dev;

        }

        

      
    }
}